﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Gree.Wuhu
{
    public static class CommonUtils
    {
        public static string getServerUrl()
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load("config.xml");
            XmlNode root = xmlDoc.SelectSingleNode("config");//指向根节点
            XmlNode xn = root.SelectSingleNode("server_url");//指向根节点下的serv_ip节点
            string serverUrl = xn.InnerText;//读出里面的值 注意读取的是string 需要类型转换的话自己做
            return serverUrl;
        }
    }
}
